import request from '@/utils/request'

// 查询物流商订单列表
export function listLogisticsOrders(query) {
  return request({
    url: '/LogisticsOrders/LogisticsOrders/list',
    method: 'get',
    params: query
  })
}

// 查询物流商订单详细
export function getLogisticsOrders(orderCode) {
  return request({
    url: '/LogisticsOrders/LogisticsOrders/' + orderCode,
    method: 'get'
  })
}

// 新增物流商订单
export function addLogisticsOrders(data) {
  return request({
    url: '/LogisticsOrders/LogisticsOrders',
    method: 'post',
    data: data
  })
}

// 修改物流商订单
export function updateLogisticsOrders(data) {
  return request({
    url: '/LogisticsOrders/LogisticsOrders',
    method: 'put',
    data: data
  })
}

// 删除物流商订单
export function delLogisticsOrders(orderCode) {
  return request({
    url: '/LogisticsOrders/LogisticsOrders/' + orderCode,
    method: 'delete'
  })
}

// 创建结算单
export function createSettlement(data) {
  return request({
    url: '/record/record',
    method: 'post',
    data: data
  });
}


// 修改订单状态
export function updateOrderStatus(orderCode, status) {
  return request({
    url: `/LogisticsOrders/LogisticsOrders/${orderCode}/status`,
    method: 'put',
    data: { status }
  });
}